package com.openweixin.sheknows.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.openweixin.sheknows.dao.UserNewScoreDao;
import com.openweixin.sheknows.domain.UserNewScore;
import com.openweixin.sheknows.service.UserNewScoreService;

@Service
public class UserNewScoreServiceImpl extends
		BaseServiceImpl<UserNewScore, Integer> implements UserNewScoreService {
	@Resource
	public void setBaseDao(UserNewScoreDao dao) {
		super.setBaseDao(dao);
		this.unsDao = dao;
	}

	private UserNewScoreDao unsDao;

	@Override
	public boolean hasNewScore(Integer uid) {
		return unsDao.getNewScoreCountByUid(uid) > 0;
	}

	@Override
	public int deleteByUid(Integer uid) {
		return unsDao.deleteByUid(uid);
	}
}
